package cn.chainfind.common.utils;

import org.apache.logging.log4j.util.Base64Util;

/**
 * ================================
 *
 * @author: ZCB
 * @email: zhang-cb@foxmail.com
 * @time: 2021/7/8 20:48
 * @version: 1.0
 * @description: =================================
 */
public class WaterMarkUtil {

    /**
     * 阿里云oss有说明
     * @return
     * https://oss.zlbcw.com/product/album/opdaosdms5nrmjg797u7.jpeg
     * https://help.aliyun.com/document_detail/44957.html?spm=5176.10695662.1996646101.searchclickresult.4f8c66b13gLvOP#title-fkf-vmt-r83
     */
    public static String waterMark(){
        StringBuilder builder = new StringBuilder("?x-oss-process=image/watermark,");
        builder.append("text_"+ Base64Util.encode("兆览包材网"));
        builder.append(",type_d3F5LXplbmhlaQ");//字体
        builder.append(",size_30");//字体大小
        builder.append(",color_FFFFFF");//字体颜色
        builder.append(",shadow_50");//阴影
        builder.append(",t_100");//透明度
        builder.append(",g_center");//居中

        return builder.toString();
    }
}
